package com.frxuexi.mynews.state

import com.frxuexi.mynews.entity.CommentEntity
import com.frxuexi.mynews.entity.NewsDetailEntity
import com.frxuexi.mynews.entity.NewsEntity
import com.frxuexi.mynews.entity.NewsTypeEntity

sealed class NewsState {
    //新闻列表响应成功
    data class onSucess(val data:List<NewsEntity>):NewsState()
    data class onError(val msg:String):NewsState()
    object Loading:NewsState()

    //新闻详情响应成功
    data class onDetailSucess(val data:NewsDetailEntity):NewsState()

    //收藏响应成功
    data class onNewsCollectSucess(val data:String):NewsState()

    //查看是否收藏
    data class onMyCollectSucess(val data:List<NewsDetailEntity>):NewsState()
    //发布评论
    data class onNewsCommentSucess(val msg:String):NewsState()

    //根基新闻id获取评论
    data class ongetCommentSucess(val data: List<CommentEntity>):NewsState()
}